home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 June: Reference Library / Dev.CD Jun 95 / Dev.CD Jun 95.toast / What's New? / New System Software Extensions / QuickDraw 3D ß / Programming / QD3D BETA Release Notes.txt
Encoding:
Text File  |  1995-04-17  |  15.2 KB  |  654 lines  |  [TEXT/WPC2]

  1. Developer's Release Notes.
  2.  
  3. Welcome to the Beta QuickDraw 3D Release
  4.  
  5.  
  6. Installation
  7.  
  8.  
  9. Note that there are three shared libraries that make up the QuickDraw 3D 
  10. package and which should be installed in your Extensions folder:
  11.  
  12.  
  13. QuickDraw™ 3D
  14.  
  15. QuickDraw™ 3D Manager
  16.  
  17. QuickDraw™ 3D Viewer
  18.  
  19.  
  20.  
  21. Your application only needs to link against QuickDraw3DLib.
  22.  
  23. New in this release is the 3D Viewer, which is similar to the QuickTime 
  24. movie controller, but it lets you manipulate 3D objects.  You don’t need to 
  25. know any QD3D calls to make use of it and it only takes around 5 calls to add it to  your application.  If you want to use it, you only need to link against  QD3DViewerLib (the header files is vcInterface.h).
  26.  
  27.  
  28. As always, please “weak link” your apps and determine if they are 
  29. installed by checking that the entry point to the QD3D library has been 
  30. loaded, see page 98 of Develop 21.
  31.  
  32.  
  33. Changes since Alpha
  34.  
  35.  
  36. • QuickDraw 3D now does it memory allocation out Multifinder Temp 
  37. memory.  This gives you total control over your heap and you can make 
  38. the size of your application’s heap as small as you need it to be for your 
  39. requirements. Note that in the case where we run out/can’t allocate out of 
  40. the temp memory, we will post an “out of memory” warning and start 
  41. allocating out of your application’s heap (we will continue posting the 
  42. warning every time we allocate out of your heap).  When we run out of 
  43. memory, we will post an error, not a warning.
  44.  
  45.  
  46. • We have further collapsed the headers from previous releases, all 
  47. geometries can now be found in QD3DGeometry.h.
  48.  
  49.  
  50. Name changes - The enclosed MPW canon script will apply all the name 
  51. changes that are part of Beta.
  52.  
  53.  
  54. Here is a description of the changes:
  55.  
  56.  
  57. • All routines names were changed from Er to Q3.
  58.  
  59.  
  60. • All types were changed from Et to TQ3, with the underscores in the 
  61. names removed.
  62.  
  63.  
  64. • All constants were changed from Ec to kQ3, with the underscores in the 
  65. names removed.
  66.  
  67.  
  68. • Functions that ended with _Draw, _Pick, were replaced by _Submit.  
  69. Whether you are doing drawing, picking, or bounding box operations is 
  70. determined by the Q3View_StartFoo  call (Q3View_StartRendering, 
  71. Q3View_StartPicking, Q3View_StartBoundingBox, or 
  72. Q3View_StartBoundingSphere).  This allows you to have only one traversal 
  73. loop defined as a function in your  application, if you so desire.
  74.  
  75.  
  76.  ErBox_Pick
  77.  
  78.  ErDisplayGroup_Pick
  79.  
  80.  ErGeneralPolygon_Pick
  81.  
  82.  ErGeometry_Pick
  83.  
  84.  ErLine_Pick
  85.  
  86.  ErMarker_Pick
  87.  
  88.  ErNURBCurve_Pick
  89.  
  90.  ErNURBPatch_Pick
  91.  
  92.  ErPoint_Pick
  93.  
  94.  ErPolygon_Pick
  95.  
  96.  ErTriGrid_Pick
  97.  
  98.  ErTriangle_Pick
  99.  
  100.  
  101. • Attributes were collapsed into a single type and some attributes were 
  102. removed.
  103.  
  104.  
  105.  ErAttributeSet_Compact
  106.  
  107.  ErAttributeSet_GetCSGEquation
  108.  
  109.  ErAttributeSet_GetConstructiveSolidGeometryID
  110.  
  111.  ErAttributeSet_GetType
  112.  
  113.  ErAttribute_Delete
  114.  
  115.  ErAttribute_Dispose
  116.  
  117.  ErFaceAttributeSet_New
  118.  
  119.  ErFaceAttributeSet_SizedNew
  120.  
  121.  ErGeometryAttributeSet_New
  122.  
  123.  ErGeometryAttributeSet_SizedNew
  124.  
  125.  ErVertexAttributeSet_New
  126.  
  127.  ErVertexAttributeSet_SizedNew
  128.  
  129.  ErViewAttributeSet_New
  130.  
  131.  ErViewAttributeSet_SizedNew
  132.  
  133.  
  134. • Function names were cleaned up and made consistent:
  135.  
  136.  
  137.     Functions of type FooData_Empty are now Foo_EmptyData
  138.  
  139.  ErBoxData_Empty
  140.  
  141.  ErCStringData_Empty
  142.  
  143.  ErGeneralPolygonData_Empty
  144.  
  145.  ErHitData_Empty
  146.  
  147.  ErLineData_Empty
  148.  
  149.  ErMarkerData_Empty
  150.  
  151.  ErNURBCurveData_Empty
  152.  
  153.  ErNURBPatchData_Empty
  154.  
  155.  ErPointData_Empty
  156.  
  157.  ErPolygonData_Empty
  158.  
  159.  ErTriGridData_Empty
  160.  
  161.  ErTriangleData_Empty
  162.  
  163.  ErUnknownBinaryData_Empty
  164.  
  165.  ErUnknownTextData_Empty
  166.  
  167.  
  168.     The function to create a renderer based on a type has changed
  169.  
  170.  ErRenderer_New Q3Renderer_NewFromType
  171.  
  172. The constant kQ3ViewStatus_Retraverse has been renamed kQ3ViewStatusRetraverse.
  173.  
  174. The clearimageState field from the drawContext structure has been removed.
  175.  
  176. • New Functionality
  177.  
  178. TQ3Status Q3InteractiveRenderer_SetDoubleBufferBypass(
  179.     TQ3RendererObject        renderer,
  180.     TQ3Boolean                bypass);
  181.  
  182. This function allows the interactive renderer to selectively turn double buffering on/off depending on whether the rasterization engine clears the screen  every frame.  The net effect is slightly increased performance on some plug-in rasterizers at the expense of increased tearing.
  183.  
  184. TQ3Status Q3InteractiveRenderer_GetDoubleBufferBypass(
  185.     TQ3RendererObject        renderer,
  186.     TQ3Boolean                *bypass);
  187.  
  188. The behavior of the memory storage object has changed.   A distinction is now made as to the location of the memory being used (either in the application's space or internal to QD3D).
  189.  
  190. TQ3ObjectType Q3MemoryStorage_GetType(
  191.     TQ3StorageObject        storage);
  192.  
  193. /*
  194.  * These calls COPY the buffer into QD3D space
  195.  */
  196. TQ3StorageObject Q3MemoryStorage_New(
  197.     const unsigned char        *buffer,
  198.     unsigned long            validSize);
  199.  
  200. TQ3Status Q3MemoryStorage_Set(
  201.      TQ3StorageObject        storage,
  202.     const unsigned char        *buffer,
  203.     unsigned long            validSize);
  204.  
  205. /*
  206.  * These calls use the pointer given - you must dispose it when you're through
  207.  */
  208. TQ3StorageObject Q3MemoryStorage_NewBuffer(
  209.     unsigned char            *buffer,
  210.     unsigned long            validSize,
  211.     unsigned long            bufferSize);
  212.  
  213. TQ3Status Q3MemoryStorage_SetBuffer(
  214.      TQ3StorageObject        storage,
  215.     unsigned char            *buffer,
  216.     unsigned long            validSize,
  217.     unsigned long            bufferSize);
  218.  
  219. Note that if the contents of the buffer are being used by QD3D, as in the case for textures maps images, you must call Q3MemoryStorage_SetBuffer when the contents of the buffer have been changed.
  220.  
  221. TQ3Status Q3MemoryStorage_GetBuffer(
  222.      TQ3StorageObject        storage,
  223.     unsigned char            **buffer,
  224.     unsigned long            *validSize,
  225.     unsigned long            *bufferSize);
  226.  
  227. CSG support for some hardware accelerators under the Interactive renderer has been added.
  228.  
  229. TQ3Status Q3InteractiveRenderer_SetCSGEquation(
  230.     TQ3RendererObject        renderer,
  231.     TQ3CSGEquation            equation);
  232.  
  233. This call allows you to set the CSG equation that will affect objects which have  Attribute Sets with CSG IDs custom attributes.
  234.  
  235. TQ3Status Q3InteractiveRenderer_GetCSGEquation(
  236.     TQ3RendererObject        renderer,
  237.     TQ3CSGEquation            *equation);
  238.  
  239. TQ3Boolean Q3IsInitialized(void);
  240.  
  241. This function indicates whether QuickDraw 3D has already been initialized.
  242.  
  243. The routines Q3View_StartBoundingBox and Q3View_StartBoundingSphere take a TQ3ComputeBounds flag as the second parameter, which provides a hint as to the method used in the bounds calculation.
  244.  
  245. New types have been added:
  246.  typedef struct TQ3PolarPoint {
  247.      float        r;
  248.      float        theta;
  249.   } TQ3PolarPoint;
  250.  
  251.  typedef struct TQ3SphericalPoint {
  252.      float        rho;
  253.      float        theta;
  254.      float        phi;
  255.  } TQ3SphericalPoint;
  256.  
  257. And the following routines have been added in conjunction with them:
  258. TQ3PolarPoint *Q3PolarPoint_Set(
  259.     TQ3PolarPoint        *polarPoint,
  260.     float                r,
  261.     float                theta);
  262.  
  263. TQ3SphericalPoint *Q3SphericalPoint_Set(
  264.     TQ3SphericalPoint    *sphericalPoint,
  265.     float                rho,
  266.     float                theta,
  267.     float                phi);
  268.  
  269.  
  270. The old "CartesianToPolar", "PolarToCartesian" ," CartesianToSpherical", and "SphericalToCartesian" routines in the Math library have been changed to:
  271. Q3PolarPoint *Q3Point2D_ToPolar(
  272.     const TQ3Point2D        *point2D,
  273.     TQ3PolarPoint            *result);
  274.     
  275. TQ3Point2D *Q3PolarPoint_ToPoint2D(
  276.     const TQ3PolarPoint        *polarPoint,
  277.     TQ3Point2D                *result);
  278.     
  279. TQ3SphericalPoint *Q3Point3D_ToSpherical(
  280.     const TQ3Point3D        *point3D,
  281.     TQ3SphericalPoint        *result);
  282.     
  283. Q3Point3D *Q3SphericalPoint_ToPoint3D(
  284.     const TQ3SphericalPoint    *sphericalPoint,
  285.     TQ3Point3D                *result);
  286.  
  287. The clear color structure used in both the DrawContext and ViewHints is now of type TQ3ColorARGB, where the "a" component represents the alpha channel.  The valid range for alpha is from 0.0 to 1.0, where 0.0 is transparent and 1.0 is solid.
  288.  
  289. • UV parameters
  290.  
  291. The parametric, UV, orientation is now as follows.  The parametric origin is defined as the left bottom corner, with U increasing towards the right and Vs increasing towards the top.  The origin of the texture images remains as top-left.
  292.  
  293. • The following calls have been removed:
  294.  
  295.  
  296.  ErController_Decomission
  297.  
  298.  ErController_MoveTracker
  299.  
  300.  ErDrawContext_ClearImageBuffer
  301.  
  302.  ErDrawContext_GetActiveBuffer
  303.  
  304.  ErDrawContext_GetClearImageState
  305.  
  306.  ErDrawContext_SetActiveBuffer
  307.  
  308.  ErDrawContext_SetClearImageState
  309.  
  310.  ErDrawContext_UpdateFrontBuffer
  311.  
  312.  ErElementClass_GetElementSize
  313.  
  314.  ErFile_Open
  315.  
  316.  ErGeneralPolygon_GetContourAttributeSet
  317.  
  318.  ErGeneralPolygon_SetContourAttributeSet
  319.  
  320.  ErLightGroup_FindLight
  321.  
  322.  ErMatrix3x3_SetRotateAboutPoint_Deg
  323.  
  324.  ErMatrix4x4_SetRotateAboutAxis_Deg
  325.  
  326.  ErMatrix4x4_SetRotateAboutPoint_Deg
  327.  
  328.  ErMatrix4x4_SetRotate_XYZ_Deg
  329.  
  330.  ErMatrix4x4_SetRotate_X_Deg
  331.  
  332.  ErMatrix4x4_SetRotate_Y_Deg
  333.  
  334.  ErMatrix4x4_SetRotate_Z_Deg
  335.  
  336.  ErMesh_PickHitGetInfo
  337.  
  338.  ErOrderedDisplayGroup_CountObjectType
  339.  
  340.  ErPick_GetFirstHit
  341.  
  342.  ErPick_GetNextHit
  343.  
  344.  ErPick_GetPreviousHit
  345.  
  346.  ErPoint3D_To2D
  347.  
  348.  ErQuaternion_SetRotateAboutAxis_Deg
  349.  
  350.  ErQuaternion_SetRotateXYZ_Deg
  351.  
  352.  ErQuaternion_SetRotateX_Deg
  353.  
  354.  ErQuaternion_SetRotateY_Deg
  355.  
  356.  ErQuaternion_SetRotateZ_Deg
  357.  
  358.  ErRenderer_New
  359.  
  360.  ErRenderer_SetIsBoundingBoxVisibleFunc
  361.  
  362.  ErTracker_GetAbsolute
  363.  
  364.  ErTracker_GetCoordinates
  365.  
  366.  ErTracker_SetAbsolute
  367.  
  368.  ErTracker_SetCoordinates
  369.  
  370. Q3DisplayGroup_BoundingBox
  371.  
  372. Q3DisplayGroup_BoundingSphere
  373.  
  374. Q3Geometry_BoundingBox
  375.  
  376. Q3Geometry_BoundingSphere
  377.  
  378. Q3View_StartBounds
  379.  
  380. Q3View_EndBounds
  381.  
  382. Q3File_BeginWrite
  383. Q3File_EndWrite
  384. all Q3Foo_Write functions 
  385. Writing is accomplished by using the _Submit calls.  To begin writing the call Q3View_StartWriting has been added.  To end writing, the call Q3View_EndWriting has been added.
  386.  
  387. Explanation:
  388.  
  389.  
  390.  ErController_Decomission
  391.  
  392.  Renamed to ErController_Decommission.
  393.  
  394.  
  395.  ErController_MoveTracker
  396.  
  397.  Replaced by the calls:
  398.  
  399. ErController_GetTrackerPosition
  400.  
  401. ErController_SetTrackerPosition
  402.  
  403. ErController_MoveTrackerPosition
  404.  
  405. ErController_GetTrackerOrientation
  406.  
  407. ErController_SetTrackerOrientation
  408.  
  409. ErController_MoveTrackerOrientation
  410.  
  411.  
  412.  ErDrawContext_ClearImageBuffer
  413.  
  414.      This operation was tied too closely to certain types of renderers and
  415.  
  416.     could not be supported by others or by certain HW accelerators.  The
  417.  
  418.     scene is cleared now as part of the Q3View_StartRendering call.
  419.  
  420.     
  421.  
  422.  ErDrawContext_GetActiveBuffer
  423.  
  424.  ErDrawContext_SetActiveBuffer
  425.  
  426.      These calls dependent on certain features which can not be 
  427. supported by
  428.  
  429.     certain types of accelerators/renderers.  The double buffer state 
  430. variable
  431.  
  432.     in the DrawContext controls the destination buffer.
  433.  
  434.  
  435.  ErDrawContext_GetClearImageState
  436.  
  437.  ErDrawContext_SetClearImageState
  438.  
  439.      These calls were redundant and their functionality is absorved by 
  440. the
  441.  
  442.     ClearImageMethod in the DrawContext.
  443.  
  444.  
  445.  ErDrawContext_UpdateFrontBuffer
  446.  
  447.      This operation was tied too closely to certain types of renderers and
  448.  
  449.     could not be supported by others or by certain HW accelerators.  The
  450.  
  451.     front buffer is now updated as part of the Q3View_EndRendering 
  452. call.  Please
  453.  
  454.     read the description for Q3Renderer_Sync and Q3Renderer_Flush in 
  455. the
  456.  
  457.     documentation.
  458.  
  459.  
  460.  
  461.  
  462.  ErFile_Open
  463.  
  464.      This function has been split into two, Q3File_OpenRead and 
  465. Q3File_OpenWrite.
  466.  
  467.     
  468.  
  469.  ErGeneralPolygon_GetContourAttributeSet
  470.  
  471.  ErGeneralPolygon_SetContourAttributeSet
  472.  
  473.    General polygons no longer have attribute sets per contour (didn't make 
  474. sense)
  475.  
  476.  
  477.  
  478.  ErMatrix3x3_SetRotateAboutPoint_Deg
  479.  
  480.  ErMatrix4x4_SetRotateAboutAxis_Deg
  481.  
  482.  ErMatrix4x4_SetRotateAboutPoint_Deg
  483.  
  484.  ErMatrix4x4_SetRotate_XYZ_Deg
  485.  
  486.  ErMatrix4x4_SetRotate_X_Deg
  487.  
  488.  ErMatrix4x4_SetRotate_Y_Deg
  489.  
  490.  ErMatrix4x4_SetRotate_Z_Deg
  491.  
  492.      You need to use the radians version of these functions.
  493.  
  494.  
  495.  ErMesh_PickHitGetInfo
  496.  
  497.     Removed in favor of the new ShapePart object.
  498.  
  499.  
  500.  
  501.  ErPick_GetFirstHit
  502.  
  503.     Removed in favor of the original, and more useful, ErPick_GetHitData
  504.  
  505.  
  506.  ErPick_GetNextHit
  507.  
  508.     Removed in favor of the original, and more useful, ErPick_GetHitData
  509.  
  510.  
  511.  ErPick_GetPreviousHit
  512.  
  513.     Removed in favor of the original, and more useful, ErPick_GetHitData
  514.  
  515.  
  516.  ErPoint3D_To2D
  517.  
  518.      Superseded by ErRationalPoint3D_To2D
  519.  
  520.  
  521.  
  522.  ErQuaternion_SetRotateAboutAxis_Deg
  523.  
  524.  ErQuaternion_SetRotateXYZ_Deg
  525.  
  526.  ErQuaternion_SetRotateX_Deg
  527.  
  528.  ErQuaternion_SetRotateY_Deg
  529.  
  530.  ErQuaternion_SetRotateZ_Deg
  531.  
  532.      You need to use the radians version of these functions.
  533.  
  534.  
  535.  ErRenderer_SetIsBoundingBoxVisibleFunc
  536.  
  537.      <need explanation>
  538.  
  539.  
  540.  ErTracker_GetAbsolute
  541.  
  542.   ErTracker_SetAbsolute
  543.  
  544. The notion of absolute trackers has been handled by usage of the 
  545. ErTracker_GetPosition and ErTracker_GetOrientation routines.  These can 
  546. either return both the absolute and relative contributions to motion, or 
  547. return the absolute and relative combined contributions.
  548.  
  549.  
  550.  ErTracker_GetCoordinates
  551.  
  552. This call has been split into ErTracker_GetPosition and 
  553. ErTracker_GetOrientation.
  554.  
  555.  
  556.  ErTracker_SetCoordinates
  557.  
  558. This call has been split into ErTracker_SetPosition for absolute 
  559. contributions to position, ErTracker_MovePosition for relative position, 
  560. ErTracker_SetOrientation for absolute rotation and 
  561. ErTracker_MoveOrientation for relative orientation.
  562.  
  563. Q3DisplayGroup_BoundingBox
  564. Q3DisplayGroup_BoundingSphere
  565. Q3Geometry_BoundingBox
  566. Q3Geometry_BoundingSphere
  567. Q3View_StartBounds
  568. Q3View_EndBounds
  569.     The same functionality is now achieved by using View_StartBoundingBox or ViewStartBoundingSphere.  The resulting bounding volume is returned as part of the ViewEndBounds calls.
  570.  
  571. Q3File_BeginWrite
  572. Q3File_EndWrite
  573. all Q3Foo_Write functions 
  574. Writing is accomplished by using the _Submit calls.  To begin writing the call Q3View_StartWriting has been added.  To end writing, the call Q3View_EndWriting has been added.
  575.  
  576. HARDWARE ACCELERATION
  577.  
  578.  
  579. Hardware acceleration happens "for free".  All you need to do is use the 
  580. interactive renderer:
  581.  
  582.  
  583.     renderer = Q3Renderer_NewFromType 
  584. (kQ3RendererTypeInteractive);
  585.  
  586.  
  587. And to make the images coherent, set up the drawContext to be double 
  588. buffered.
  589.  
  590.  
  591. In addition, some hardware rasterizer engines (such as Apple's) can 
  592. actually make coherent images without double buffering.  This can provide 
  593. a significant speed advantage, at the possible cost of some tearing.  To take 
  594. advantage of such hardware, you keep the drawContext double buffered 
  595. (to say that you want the images coherent) and make the call
  596.  
  597.  
  598.     Q3InteractiveRenderer_SetDoubleBufferBypass (renderer, kQ3True);
  599.  
  600.  
  601. In the unlikely event that you want to use a particular rasterizer with the 
  602. interactive renderer, you can set a "preference" with the call
  603.  
  604.  
  605.     Q3InteractiveRenderer_SetPreferences (renderer, vendor, engine);
  606.  
  607.  
  608. where vendor and engine are from QD3DAcceleration.h.  When we want to 
  609. show the difference between hardware and software rasterization, we use 
  610. this call to "prefer" the software rasterizer, or to just us the best available 
  611. rasterizer.
  612.  
  613.  
  614.  
  615. TEXTURE MAP STORAGE
  616.  
  617. You can use the texture map memoryStorage object to either keep the 
  618. pixels in "your domain" or "QD3D's domain".  That is either you can keep 
  619. the buffer (and modify it, e. g. for playing a QuickTime movie), or you can 
  620. let set up the image, then have QD3D copy it, then throw away your copy.  
  621. The former is better for animating texture maps, the latter requires less 
  622. bookkeeping on your part.
  623.  
  624.  
  625. In either case, you set up a TQ3StoragePixMap with
  626.  
  627.  
  628.     storagePixMap.image     = Q3MemoryStorage_New (<see below>);
  629.  
  630.     storagePixMap.width     = width;
  631.  
  632.     storagePixMap.height    = height;
  633.  
  634.     storagePixMap.rowBytes  = rowBytes;
  635.  
  636.     storagePixMap.pixelSize = 32;                // the only size supported
  637.  
  638.     storagePixMap.pixelType = kQ3PixelTypeRGB32; // the only type 
  639. supported
  640.  
  641.     storagePixMap.bitOrder  = kQ3EndianBig;      // the only order 
  642. supported
  643.  
  644.     storagePixMap.byteOrder = kQ3EndianBig;      // the only order 
  645. supported
  646.  
  647.  
  648. To keep the image in your domain (and incur no copy overhead) you 
  649. should make the memoryStorage object point to your buffer:
  650.  
  651.  
  652.     <create the off-screen gWorld>
  653.  
  654.     <image into the gWor